Interleaving codeword portions between multiple planes and/or dies of a flash memory device

ABSTRACT

A system, a method and a non-transitory computer readable medium are disclosed. The non-transitory computer readable medium may store instructions for: (I) interleaving at least two portions of a first codeword of a group of codewords between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; and (II) interleaving different portions of other codewords of the group of codewords between multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule. The at least two portions may be programmed to rows in different flash memory blocks, and the flash memory planes may belong to the same or multiple flash memory dies. The programming type ordering may define different decoupling sequence steps with sizes set for different programming types according to sensitivity to noise.

RELATED APPLICATIONS

This application is a NONPROVISIONAL of, claims priority and incorporates by reference U.S. provisional patent application No. 61/420,654, filed Dec. 2, 2010.

BACKGROUND

Flash memory devices include multiple rows. A programming of one row can affect the information stored in another row.

There is a need to provide efficient flash memory programming schemes.

SUMMARY

In an embodiment of the present invention, a non-transitory computer readable medium may be provided and may store instructions for: (i) interleaving at least two portions of a first codeword of the group between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; and (ii) interleaving different portions of other codewords of the group between multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule. The multiple flash memory planes may include the at least two memory flash memory planes. The codeword portions ordering rule determines an order of programming of different portions of a same codeword. The even odd ordering rule determines an order of programming codeword portions to even pages and odd pages of the flash memory planes. The programming type ordering rule determines an order of programming types that differ from each other by significance.

The computer readable medium may store instructions for violating the at least one ordering rule for each type of codewords of the different types of codewords.

The computer readable medium may store instructions for programming the at least two portions to rows that have a same row number.

The computer readable medium may store instructions for programming the at least two portions to rows that have different row numbers.

The computer readable medium may store instructions for programming the group of codewords to rows that define a flash memory block per each flash memory plane. The interleaving of the at least two portions may include programming the at least two portions to a row at a start of a flash memory block and to another row at an end of another flash memory block.

The multiple flash memory planes may belong to a same flash memory die.

The multiple flash memory planes may belong to multiple flash memory dies.

The computer readable medium may store instructions for violating only the even odd ordering rule.

The computer readable medium may store instructions for violating only the programming type ordering rule.

The computer readable medium may store instructions for violating only the codeword portions ordering rule.

The even odd ordering rule may be indifferent to a programming order between odd and even pages.

The computer readable medium may store instructions for interleaving each codeword between at least four flash memory planes.

The computer readable medium may store instructions for: (i) determining a logical programming order based upon the even odd ordering rule and the programming type ordering rule; and (ii) applying a logical to physical mapping on the logical programming order to provide a physical programming order that is upheld during the programming of the interleaving of the different portions of the other codewords of the group.

The computer readable medium may store instructions for at least partially compensating for an expected outcome of the violating of the at least one ordering rule during the interleaving of the at least two portions of the first codeword.

Additional embodiments of the invention include a method for programming a group of codewords, each codeword may include multiple codeword portions. The method may include: (i) interleaving at least two portions of a first codeword of the group between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; and (ii) interleaving different portions of other codewords of the group between multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule. The multiple flash memory planes may include the at least two memory flash memory planes. The codeword portions ordering rule determines an order of programming of different portions of a same codeword. The even odd ordering rule determines an order of programming codeword portions to even pages and odd pages of the flash memory planes. The programming type ordering rule determines an order of programming types that differ from each other by significance.

The method may include violating the at least one ordering rule for each type of codewords of the different types of codewords.

The interleaving of the at least two portions may include programming the at least two portions to rows having a same row number.

The interleaving of the at least two portions may include programming the at least two portions to rows having different row numbers.

The method may include programming the group of codewords to rows that define a flash memory block per each flash memory plane. The interleaving of the at least two portions may include programming the at least two portions to a row at a start of a flash memory block and to another row at an end of another flash memory block.

The multiple flash memory planes may belong to a same flash memory die.

The multiple flash memory planes may belong to multiple flash memory dies.

The interleaving of the at least two portions may include violating only the even odd ordering rule.

The interleaving of the at least two portions may include violating only the programming type ordering rule.

The interleaving of the at least two portions may include violating only the codeword portions ordering rule.

The even odd ordering rule may be indifferent to a programming order between odd and even pages.

The method may include interleaving each codeword between at least four flash memory planes.

The method may include determining an order of programming of the different portions of the other codewords by: (a) determining a logical programming order based upon the even odd ordering rule and the programming type ordering rule; and (h) applying a logical to physical mapping on the logical programming order to provide a physical programming order that is upheld during the programming of the interleaving of the different portions of the other codewords of the group.

The method may include compensating for an expected outcome of the violating of the at least one ordering rule during the interleaving of the at least two portions of the first codeword.

Additional embodiments of the invention include a system that may include (a) at least one flash memory die that comprises multiple flash memory planes; and (b) a memory controller. The memory controller may be arranged to: (i) interleave at least two portions of a first codeword of the group between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; and (ii) interleave different portions of other codewords of the group between the multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule. The multiple flash memory planes may include the at least two memory flash memory planes. The codeword portions ordering rule determines an order of programming of different portions of a same codeword. The even odd ordering rule determines an order of program codeword portions to even pages and odd pages of the flash memory planes. The program type ordering rule determines an order of program types that differ from each other by significance.

The memory controller may be arranged to violate the at least one ordering rule for each type of codewords of the different types of codewords.

The memory controller may be arranged to program the at least two portions to rows having a same row number.

The memory controller may be arranged to program the at least two portions to rows having different row numbers.

The memory controller may be arranged to program the group of codewords to rows that define a flash memory block per each flash memory plane. The memory controller may be arranged to program the at least two portions to a row at a start of a flash memory block and to another row at an end of another flash memory block.

The multiple flash memory planes may belong to a same flash memory die.

The multiple flash memory planes may belong to multiple flash memory dies.

The memory controller may be arranged to violate only the even odd ordering rule.

The memory controller may be arranged to violate only the program type ordering rule.

The memory controller may be arranged to violate only the codeword portions ordering rule.

The even odd ordering rule is indifferent to a program order between odd and even pages.

The memory controller may be arranged to interleave each codeword between at least four flash memory planes.

The memory controller may be arranged to: (a) determine a logical program order based upon the even odd ordering rule and the program type ordering rule; and (b) apply a logical to physical mapping on the logical program order to provide a physical program order that is upheld during the interleaving of the different portions of the other codewords of the group.

The system may include an encoder that may be arranged to at least partially compensate for an expected outcome of violating of the at least one ordering rule during the interleaving of the at least two portions of the first codeword.

The programming type ordering rule may define at least two different decoupling sequence steps for at least two different programming types.

The size of the different decoupling sequence steps can be set according to sensitivity of the different types of programming to noise.

BRIEF DESCRIPTION OF THE DRAWINGS

The subject matter regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. The invention, however, both as to organization and method of operation, together with objects, features, and advantages thereof, may best be understood by reference to the following detailed description when read with the accompanying drawings in which:

FIGS. 1A-1C illustrate a dual-die dual-plane mapping of page number mapping to physical pages according to an embodiment of the invention;

FIG. 2 illustrates a codewords interleaving example, between a pair of pages, located in two separate dies according to an embodiment of the invention;

FIGS. 3A-3C and 4A-4C illustrate dual-die dual-plane mappings with decoupling sequences of step sizes of 1 and 4 respectively, according to various embodiments of the invention;

FIGS. 5A-5B and 6A-6B illustrate single-die dual-plane mappings with decoupling sequences of step sizes of 1 and 4 respectively, according to various embodiments of the invention;

FIG. 7 illustrates a flow chart of a method for programming according to an embodiment of the invention;

FIG. 8 illustrates an example of dual-die dual-plane mapping according to an embodiment of the invention;

FIG. 9 illustrates an interleaving of codewords over four pages of two dies according to an embodiment of the invention;

FIG. 10 illustrates quad-die dual-plane mapping according to an embodiment of the invention;

FIGS. 11 and 12 illustrate methods for interleaving codewords according to various embodiments of the invention;

FIG. 13 illustrates a method for interleaving codewords and reading codewords according to an embodiment of the invention;

FIGS. 14-15 illustrate systems according to various embodiments of the invention;

FIG. 16 illustrates a method for receiving and writing codewords according to an embodiment of the invention; and

FIG. 17 illustrates a threshold voltage distribution and read thresholds for a three bit per cell flash memory cell.

It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements for clarity. Further, where considered appropriate, reference numerals may be repeated among the figures to indicate corresponding or analogous elements.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the invention. It should be appreciated, however, that the present methods, systems and computer readable media may be practiced without these specific details. In other instances, well-known methods, procedures, and components have not been described in detail so as not to obscure the present invention.

The following text refers to flash memory devices. It is noted that the described and the claimed methods, systems and computer readable mediums can be applied mutatis mutandis to other types of nonvolatile memory devices.

The following text refers to pages and blocks. It is noted that other partitions of the virtual and physical flash memory devices can be applied.

There are different types of programming that differ from each other by their significance. Non limiting examples of different types of programming may include a most significant bit (MSB) programming, a central significant bit (CSB) programming and a least significant bit (LSB) programming.

FIG. 17 illustrates a threshold voltage distribution 1600 of a three bit per cell (bpc) flash memory cell. The threshold voltage distribution 1600 includes multiple lobes 1600(0)-1600(7). FIG. 16 also illustrates read thresholds 1610-1616.

Each of these read thresholds is positioned between two adjacent lobes. The read thresholds include a MSB read threshold 1613, CSB read thresholds 1611 and 1615, and LSB read thresholds 1610, 1612, 1614 and 1616.

LSB, CSB and MSB programming are arranged to program flash memory cells to the appropriate lobe. The MSB programming is responsive to the MSB read threshold. The CSB programming is responsive to the CSB read thresholds. The LSB programming is responsive to LSB programming thresholds. In flash memory cells that may store more than three bits per cell—there are defined multiple CSB programming types of different significance.

The different types of programming are associated with different types of logical pages. Thus, a MSB page represents a content of a flash memory device page that was programmed by MSB programming. The same applied to a LSB page and to a CSB page.

A flash memory device may include multiple flash memory rows and can be partitioned to odd pages and even pages. The flash memory cells of odd and even pages may be proximate to each other.

According to an embodiment of the invention there are provided one or more ordering rules. Each ordering rule can be applied on a majority of codeword portions to be programmed. Some codeword portions are programmed while violating at least one ordering rule so that the majority of the codeword portions can be programmed while maintaining all of the one or more ordering rules.

A violation of an ordering rule can be seen as an exception of an ordering rule. It should be appreciated that defining ordering rules that include one or more exceptions to the programming of one or more codeword portions is equivalent to a violation of ordering rules that are applied on the majority of codewords.

Usually, the process of flash memory programming includes encoding data to be resilient to read errors. Even and odd pages may provide different resiliency to read errors—and can be regarded as being of different reliability.

The difference in read reliability can result from the order of programming the odd and even pages—usually the odd pages are programmed after the even pages, during which the even pages suffer additional noise. This phenomenon is known as program disturbs due to inherent strong coupling between even and odd pages within the same row.

A flash memory die can include one or more flash memory planes. Different flash memory planes of a flash memory die can be accessed independently.

For simplicity of explanation rows of different flash memory planes (hereinafter-planes) that share the same row number may be referred in the following description as belonging to the same row. Rows that belong to different flash memory dies that have the same row number can be referred to as the same row.

In the following text a size of the decoupling sequence step is defined as the difference between certain row numbers—regardless of the plane or die that includes these rows.

Flash memory planes that belong to the same flash memory die can differ from other each other by one or more characteristics (for example—have different threshold voltage distributions). This difference can be at least partially compensated by interleaving codewords between different flash memory planes.

Different flash memory dies can differ from the other by one or more characteristics. This difference may be at least partially compensated by interleaving codewords between different flash memory dies.

When multi-plane multi-die programming is possible, then it may be desirable to interleave codewords across multiple dies and maybe across even and odd pages. Some programming orders may require using large buffers for holding encoded data prior to programming. This is since such interleaving would usually require programming all MSB pages and only then continues to LSB pages, in order to eliminate violation of programming ordering such as even-odd codeword interleaving.

According to various embodiments of the invention a multi-die multi-plane programming scheme may be provided such that the buffering requirements are minimized. This multi-die multi-plane programming scheme may enable a generic decoupling sequence for multi-level cell (MLC) devices, and a generic page/row permutation.

A decoupling sequence, in MLC flash memory devices, refers to the programming sequence order of different page types, such as most significant bits (MSB) and least significant bits (LSB) pages (known also as lower and upper pages, respectively). To avoid program disturbs it is usually desired to perform MSB programming of several rows, and only then perform LSB programming of rows of already MSB programmed rows. This is because of the coupling effects between neighboring rows.

When the decoupling sequence step size is zero, after every row MSB programming, an LSB row programming of the same row takes place. This means that right after LSB row programming, the next row is programmed with MSB data. This may induce a relatively strong noise on the last LSB programmed pages. Therefore, increasing the decoupling sequence step size can reduce the programming noise.

FIGS. 1A-1C illustrate a table 10 that demonstrates a dual-die and dual-plane programming scheme that uses a page permutation for programming four different planes of two flash memory dies (each flash memory die having two planes).

The leftmost column of table 10 represents the row numbers. There are two dies (die 0 and die 1), each die includes two planes (plane 0 and plane 1). Each plane includes odd pages and even pages. Each of these even and odd pages includes an MSB page and LSB page (each of the pages can be MSB and LSB programmed).

Accordingly, table 10 has sixteen columns (in addition to the left most column) that represent the programming order of each page taken into account MSB programming and LSB programming. The numbers in these sixteen columns represent the programming order.

It is assumed that codewords have different portions and that different portions of the same codewords are programmed in a sequential manner and according to the programming order.

An example of an interleaving scheme includes interleaving a codeword over every 4 consecutive pages, such that the first codeword is programmed over pages 0-3. Another codeword can be programmed over pages 4-7.

In order to eliminate using long codewords, while keeping this interleaving scheme, every four pages may contain 8 interleaved codewords (where every codeword is split into four pages). In such a case the length of every codeword is exactly half of a single page length (assuming all pages have identical sizes).

Table 10 illustrates the programming order in a flash memory block. The flash memory block spans across flash memory planes and flash memory dies.

Table 10 illustrates an example where the decoupling sequence step size is equal to the number of rows of a flash memory block. In other words, all MSB pages within the flash memory block are programmed first. Once all MSB pages of the block are programmed, the LSB pages of the block are programmed, using the same page ordering. It is noted that codewords may be interleaved between even page numbers and odd page numbers.

The interleaving does not require additional memory buffers as it is done between two pages which lie on different dies. Codewords interleaving of the two first codewords according to an embodiment of the invention is demonstrated in FIG. 2.

FIG. 2 illustrates page_0 (20) of die_0 (18) and page_1 (21) of die_1 (19). These two pages store two codewords, codeword 0 and codeword 1, which are both interleaved over these two pages. One half of codeword 0 (CW0 a 23) is programmed to page_0, and another half (CW0 b 24) is programmed onto page_1. The same programming is applied on codeword 1, which is separated into codeword halves CW1 a (25) and CW1 b (26).

As may be noticed from FIGS. 1A-1C and FIG. 2, that page_0 is an even page on Die_0, and page_1 is also an even page on Die_1. In this exceptional case the codewords interleaving is across two even pages. This exception (also referred to as a violation of an even odd ordering rule) allows other codewords portions to be interleaved while maintaining the even odd ordering rule.

It is noted that the programming includes programming every even page before every odd page.

When interleaving codewords across page_2K and page_(2K+1), where K=0, 511, most codewords are programmed while maintaining even/odd interleaving across dies.

Other exceptions to the ordering rules can occur at the end of the block which interleave between two odd pages. These exceptions complement the exceptions at the start of the block.

According to an embodiment of the invention the interleaving of a first codeword can include interleaving the portions of the first codeword between even and odd pages that belong to the first and last row of the block.

This may require buffering the one or more first codeword portions to be programmed at the end of the block but eliminates the interleaving order violations. This programming can be regarded as a violation of the codeword portions ordering rule (that is applied on a majority of codewords and even on almost all codewords) that may require sequential programming of different portions of the same codeword.

The programming scheme shown in FIGS. 1A-1C may cause that a write throughput at certain time intervals is defined by the largest program time (tPROG), which is usually the LSB programming tPROG. It becomes even more noticeable in three bits per cell flash memory devices, where the tPROG difference between the LSB programming and the MSB programming is dramatically higher. That is since LSB pages are programmed sequentially along the block, after all MSB pages are already programmed.

According to an embodiment of the invention, it is suggested to program a few MSB rows, and then program the first LSB row. Thus—it may be desired to use a decoupling sequence step of size S that is smaller than the number of rows of the entire block.

Thus—after completing a LSB programming of the S first rows (the first time the decoupling sequence step is obtained), initiating a MSB programming. This may be followed by a LSB programming—while maintaining the decoupling sequence step.

FIGS. 3A-3C illustrates a dual-die dual-plane mapping of page numbers to physical pages with a decoupling sequence of step size of 1, according to an embodiment of the invention.

Table 30 shown in FIGS. 3A-3C illustrates the programming order.

This programming scheme (referred to dual-die dual-plane programming sequence, with a dual die interleaving permutation) allows almost every page couple [i.e. page_2K and page_(2K+1), K=0, . . . , 511] to be mapped to physically even and odd pages, which enables interleaving of codewords across pairs of pages over physical even/odd pages.

In addition—MSB and LSB pages are programmed with a decoupling sequence step size of 1, which means that LSB pages are programmed only after at least two MSB rows are completely programmed. Thus there is at least one row spacing between a new programmed MSB row, and the previous LSB programmed rows.

It is noted that in contrast with traditional (prior art) decoupling sequences some MSB rows may be incompletely programmed before starting to program the LSB rows. This is exemplified in FIG. 3, where the programming begins with MSB pages.

The first LSB programmed page is page_20. When it is programmed, the first two rows (0 and 1) are already fully MSB programmed, however, some pages on row 2 are programmed as well, due to the multi-die permutation, i.e. pages 13, 15, 16 and 18 are programmed on row 2, when the LSB is programmed.

FIG. 4 illustrates a dual-die dual-plane mapping of page numbers to physical pages with the suggested decoupling sequence of step size 4, according to an embodiment of the invention. The programming order is illustrated by table 40.

This programming scheme allows almost every page couple [i.e. page_2K and page_(2K+1), K=0, 511] to be mapped to physically even and odd pages, which enables interleaving of codewords across pairs of pages over physical even/odd pages.

MSB and LSB page types are programmed with a decoupling sequence step size of 4, which means that LSB pages are programmed only after at least five MSB rows are completely programmed. Thus there is at least four rows spacing between a new programmed MSB row, and the previous LSB programmed rows.

FIGS. 5 and 6 demonstrate the same technique for a multi-plane interleaving of codewords for a single-die configuration, according to various embodiments of the invention.

In FIG. 5 (table 50), a single-die dual-plane mapping of page numbers to physical pages with the suggested decoupling sequence of step size 1 is illustrated.

In FIG. 6 (table 60), a single-die dual-plane mapping of page numbers to physical pages with the suggested decoupling sequence of step size 4 is described. The interleaving of codewords can be done for every pair of even and odd indices, for example indices 0 and 1, then the next codeword can be mapped to indices 2 and 3

FIG. 7 illustrated a method 700 for interleaving of codewords according to an embodiment of the invention.

Method 700 provides a non-limiting example of programming to a 2 bpc flash memory cells by MSB programming and LSB programming with a decoupling step size stepTH predefined, while allowing multi-plane multi-die interleaving.

For simplicity of explanation FIG. 7 illustrates an interleaving of codeword portions that maintains all the ordering rules. Thus, the stages of method 700 are repeated for the majority of codewords. It is noted that method 700 includes (not shown) stages of programming while violating one or more ordering rules.

Method 710 starts by stage 710 of receiving an instruction (by a memory controller) to program a new codeword.

Stage 710 is followed by stage 720 of checking whether to program the new codeword to MSB pages (MSB programming) or LSB pages (LSB programming).

The checking is responsive to:

(A) The decoupling sequence step size stepTH (MsbRows-LsbRows>stepTH), wherein MsbRows is the number of fully programmed MSB rows, and LsbRows is the number of fully programmed LSB rows; and

(B) The overall number of rows (NumOfRows) allocated for the programming.

If MSB programming covered the overall number of rows then the remaining programming should be LSB programming (MsbRows<NumOfRows).

If there is a sufficiently large spacing, i.e. the number of fully programmed MSB rows is larger than the number of fully programmed LSB rows by more than the configured decoupling sequence step size, denoted in by stepTH, and then an additional LSB pages may be programmed.

Clearly, when all MSB rows are already programmed, then the residual LSB pages are programmed according to the page mapping permutation. After interleaving of the codewords across multiple physical pages and programming the counter of MSB/LSB full rows is updated—to reflect the current number of full MSB/LSB programmed rows.

If all MSB rows are not already programmed and if the decoupling sequence step size is not maintained then stage 720 is followed by stages 732, 734 and 736. Else, stage 720 is followed by stages 742, 744 and 746.

Stage 732 includes choosing the next MSB page pair according to permutation.

Stage 734 includes interleaving codewords over MSB page pairs.

Stage 736 includes updating MsbRows Counter.

Stage 742 includes choosing the next LSB page pair according to permutation.

Stage 744 includes interleaving codewords over LSB page pairs.

Stage 746 includes updating LshRows Counter.

According to an embodiment of the invention the decoupling sequence definition and algorithm is extended to any number of bits-per cell flash memory devices. For example, in a 3 bpc flash memory device there are three types of pages to program—MSB pages, CSB pages and LSB pages.

According to an embodiment of the invention a process of programming can include:

-   -   i. Program MSB pages until a decoupling sequence step is         obtained, then program CSB pages.     -   ii. When there are sufficiently many CSB programmed rows, i.e.         at least decoupling sequence step programmed CSB rows, and then         program the first LSB pages.     -   iii. Continue programming MSB/CSB/LSB while maintaining the         decoupling sequence step size for CSB w.r.t MSB and for LSB         w.r.t CSB.

Yet according to another embodiment of the invention, the size of the decoupling sequence step can be changed between types of programming. For example, when programming a three hit-per cell device (three types of programming available), the size of the decoupling sequence step for CSB programming differs from the size of the decoupling sequence step for LSB programming. Conveniently, the size of the decoupling sequence step increases as the significance of the bit decreases.

The sizes of the decoupling sequence steps associated with different types of programming may be adapted to the sensitivity to noises to these different types of programming. For example, LSB programming is usually the most sensitive type of programming to program disturbs from neighboring rows and should be associated with the largest decoupling sequence step.

When there are J different types of programming (associated with bits of J different significance levels) then up to (J−1) different decoupling sequence step sizes can be defined. It is noted that fewer than (J−1) different decoupling sequence step sizes can be defined—for example if at least a pair of programming types share the same decoupling sequence step size.

For example, in programming a 3 bpc flash memory cells two different decoupling sequence step sizes can be defined.

According to another embodiment of the invention includes an extension of the page ordering to any type of row order. Thus, any mapping shown by any tables of any of the figures may reflect a mapping to a logical row number, while the physical row order may be different, and be defined by an additional mapping.

According to yet another embodiment of the invention a method can include interleaving of codewords among MSB and LSB page pairs. The method may use a similar decoupling sequence for page programming. Instead of interleaving over even/odd pages of different dies, the codeword interleaving may be applied among MSB and LSB pages. As this is not feasible in general for all page pairs since MSB pages must be programmed before the LSB pages, there will be exceptions at the first row of the block.

Such a programming sequence is illustrated in FIG. 8 (table 80), with a decoupling sequence of a step size of 1. This programming sequence includes programming a LSB page while keeping a single row space from the next MSB page to be programmed. This programming sequence may interleave a codeword over page_2K and page_(2K+1), where K=0, 511.

As may be noticed, the first two rows are programmed with MSB pages before the interleaving between MSB and LSB pages begins.

The first programmed LSB page is page_20, which holds a codeword interleaved with MSB page_21. The decoupling sequence step size of at least 1 row is maintained till the end of the block. An interleaving exception will occur by the end of the block, where the last few codewords will be interleaved over pairs of LSB pages. A possible drawback of this approach is the fact that the highest expected errors are on even LSB pages, and those are interleaved with odd MSB pages, where all MSB pages usually suffer less errors since a single read threshold is required.

It is noted that instead of breaking the MSB/LSB interleaving sequence at the beginning and end of a block, the interleaving may be done among different blocks, where the last LSB pages are interleaved with the first MSB pages of a new block. This maintains MSB/LSB interleaving for most page pairs on the flash memory device.

According to another embodiment of the invention the interleaving of codewords is done over multiple devices, and multiple pages. That is, the examples and methods presented earlier are extendible to more than two pairs of pages for codewords' interleaving. For example, every codeword may be interleaved over four pages. Thus if the four pages can lie on separate devices, a higher diversity interleaving can be obtained.

FIG. 9 illustrates an interleaving of four codewords over four pages 90-93 that belong to four different flash memory dies 98(0)-98(3) according to an embodiment of the invention.

Pages 0-3 (90-93) store 4 codewords, codeword 0 codeword 1, codeword 2 and codeword 3, which are all interleaved over the 4 pages. The first fourth of codeword 0, denoted by CW0 a 94(0), is programmed to page_0 (90), another fourth of codeword 0, denoted by CW0 b 94(1), is programmed to page_1 (91), another fourth, denoted by CW0 c 94(2), is programmed to page_2 (92), and the last fourth, denoted by CW0 d 94(3), is programmed to page_3 (93). Other codewords are also interleaved between four flash memory dies 98(0)-98(3).

FIG. 10 illustrates a 4-die interleaving scheme according to an embodiment of the invention.

FIG. 10 includes table 100. As may be noticed from FIG. 10, with interleaving over every 4 consecutive pages, most of the codewords are interleaved over even/odd MSB/LSB pages, where every page is programmed to a different die. As may be noticed, the decoupling sequence like defined earlier is maintained, where here the step is of size of 1, and only after two MSB rows are full the LSB programming starts, where the LSB and MSB interleaving includes also the even/odd interleaving, and obtains averaging over 4 dies for nearly all pages. The concept is extendible within the framework of this invention to any number of dies, any decoupling step, any row permutation, etc.

According to various embodiments of the invention the mentioned above schemes can be extended to 3 bpc devices. In the case of 3 pbc, the interleaving among page types is MSB/LSB and the CSBs are self interleaved (only even/odd). It is clearly extendible to any n-bits per cell devices following the same guidelines introduced in this invention.

Each of the mentioned above schemes can be executed by a device that may include a flash memory device and a memory controller. The memory controller controls the execution of each of the mentioned above schemes or a combination of such schemes.

Each of the mentioned above schemes can be executed by a device that may include a computer or a memory controller that executes instructions stored in a non-transitory computer readable medium.

FIG. 11 illustrates method 1100 for interleaving codewords according to an embodiment of the invention.

Method 1100 may start by stage 1110 that may include determining or receiving a programming order.

The programming order can take into account one or more of the following rules: (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule.

The even odd ordering rule determines an order of programming codeword portions to even pages and odd pages of the flash memory planes. The programming type ordering rule determines an order of programming types that differ from each other by significance. The codeword portions ordering rule determines an order of programming of different portions of a same codeword.

The programming order may start (or may include) a violation of one (or more) of these rules for programming two or more portions of a limited number of codeword portions and then maintain all of these rules when programming a much larger number of codeword portions. The violation facilitates maintaining the rules for other codewords (or other portions of the codewords).

For simplicity of explanation it will be assumed that the violation occurs when programming two or more portions of a first codeword. The first codeword can be the first codeword that is being programmed to a flash memory block but this is not necessarily so. It is noted that the violation can occur for more than a single codeword (as illustrated in FIG. 1) and then the violation can be applied for two or more codeword portions of the first codeword while other portions of that first codeword can be programmed while maintaining the rules.

Stage 1110 may include determining an order of programming of the different portions of the other codewords by: (a) determining a logical programming order based upon the even odd ordering rule, the codeword portions ordering rule and the programming type ordering rule; and (b) applying a logical to physical mapping on the logical programming order to provide a physical programming order that is upheld during the programming of the interleaving of the different portions of the other codewords of the group.

Stage 1110 is followed by stage 1120 of receiving a group of codewords to be programmed.

Stage 1120 can be followed by stages 1130 and 1140.

FIG. 11 illustrates stage 1120 as being followed by stages 1130 and 1140. FIG. 11 illustrates stage 1130 as being followed by stage 1140 but this is not necessarily so. For example, the interleaving may occur before receiving the entire group of codewords. Yet for another example, the violation can occur after some codewords were programmed while maintaining the rules. Referring to the last example, violation of rules during the first CSB programming can occur after maintaining all the rules for MSB programming of one or more previous codewords.

Stage 1130 includes interleaving at least two portions of a first codeword of the group between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule. Thus stage 1130 can include applying on the at least two portions of the first codeword other rules than those applied on most of the codeword portions.

Stage 1130 may include at least one of the following:

(A) Programming the at least two portions to rows having a same row number.

(B) Programming the at least two portions to rows having different row numbers.

(C) Programming the at least two portions to a row at a start of a flash memory block and to a row at the end of the flash memory block. These rows can belong to the same flash memory plane or to different flash memory planes. The entire group of codewords is programmed to rows that define the flash memory block.

(D) Violating only the even odd ordering rule. See, for example, FIGS. 1A-1C and 3A-3C.

(E) Violating only the programming type ordering rule. See, for example, FIG. 8.

(F) Violating only the codeword portions ordering rule. For example—programming a first portion of a first codeword to an odd MSB page of a first row of a block of first flash memory plane and programming a second portion of the first codeword to an even MSB page of a last row of a corresponding block

Stage 1140 includes interleaving different portions of other codewords of the group between multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule.

The multiple flash memory planes (of stage 1140) may include the at least two memory flash memory planes (of stage 1130).

It is noted that the violation of a rule can lead to increased error rate in the codeword portions that were programmed during this violation. This can be at least compensated by changing at least one encoding parameters of these codeword portions—for example by allocating more redundancy bits for these codeword portions in relation to the redundancy bits allocated to codeword portions that are programmed while maintaining the rules. Additionally or alternatively, the compensation may involve applying stronger error correction decoding, reading these codeword portions multiple times, performing soft decoding and any other methods for compensating (at least partially) for the violations.

This is illustrated by stage 1122 of receiving a group of codewords wherein the group of codewords are encoded such as to at least partially compensate for an expected outcome of the violating of the at least one ordering rule during the interleaving of the at least two portions of the first codeword.

FIG. 12 illustrates method 1200 for interleaving codewords according to an embodiment of the invention.

Method 1200 differs from method 1100 of FIG. 11 by including stages 1210 and 1220 instead of stage 1120. Stage 1210 is preceded by stage 1110. Stage 1220 is followed by stages 1130 and 1140.

Stage 1210 includes receiving data to be encoded to provide a group of codewords.

Stage 1210 is followed by stage 1220 of generating the group of codewords by encoding the data while at least partially compensating for an expected outcome of violating the at least one ordering rule during interleaving of at least two portions of a first codeword.

According to various embodiments of the invention the compensation can be applied when reading the programmed codewords from the flash memory device. The data can be read multiple times, it can be soft decoded, and the like. This is illustrated in FIG. 13.

FIG. 13 illustrates method 1300 for interleaving and reading codewords according to various embodiments of the invention. Method 1300 differs from method 1100 by including stage 1310 of reading the group of codewords (or a part of the group) while at least partially compensating for excessive errors that may result from the violation of one or more rules (during stage 1130).

FIG. 14 illustrates system 1400 according to an embodiment of the invention.

System 1400 is illustrated as including two flash memory dies 1410 and 1420, each including two planes—(1412, 1414) and (1422, 1424), an interface (1416 and 1426 respectively) and an internal register (1418 and 1428). Each flash memory die (or even each plane) can have an internal controller (not shown) for managing read and write within the flash memory die.

System 1400 may execute any of the mentioned above methods, may apply any of the mentioned above programming sequences as well as other programming sequences such as those that differ from those illustrated above by the size of the decoupling sequence step.

The internal register (1418 and 1428) of each flash memory die is used as an intermediate stage for transferring codeword portions.

Each plane 1412, 1414, 1422 and 1424 has multiple rows. For simplicity of explanation rows of the different flash memory planes that share the same row number are regarded as the same row of the flash memory block.

The flash memory dies 1410 and 1420 are connected to a memory controller 1430. The memory controller 1430 may include an ordering circuit 1431, a read circuit 1432, a programming circuit 1433, an erase circuit 1434, an encoder 1435, a decoder 1436, a memory management circuit 1437 and a random access memory (RAM) circuit 1438. It is noted that the memory controller 1430 may include less circuits, more circuits or other circuits.

The memory management circuit 1437 can perform flash memory management operations such as wear leveling.

The encoder 1435 can encode data to provide codewords. The decoder 1436 can decode codewords. These circuits (1435 and 1436) can treat codeword portions that are interleaved while violating one or more ordering rules in a different manner than other codeword portions. They can apply to the former codeword portions error correcting codes that have better error correction capabilities. The latter codewords can include more redundancy bits and the like. This can at least partially compensate for the expected higher error rates that may result from the violation of the at least one ordering rule.

The ordering circuit 1431 can be used for receiving or determining an order of programming of codeword portions. It may also be used to maintain the order of reading the codeword portions from the flash memory planes.

The ordering circuit 1431 outputs order information to the programming circuit 1433 that represents an interleaving of at least two portions of a first codeword of the group between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; and interleaving different portions of other codewords of the group between the multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule;

The read circuit 1432 can read codeword portions from the flash memory planes based on read instructions and order information received from the ordering circuit 1431 and can decode the codewords. The decoding can include compensating for excessive errors expected from at least two codeword portions of a first codeword that were programmed while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule.

The programming circuit 1433 can program the codeword portions such as to:

-   -   i. Interleave at least two codeword portions of a first codeword         between at least two different flash memory planes while         violating at least one ordering rule out of (a) an even odd         ordering rule, (b) a programming type ordering rule, and (c) a         codeword portions ordering rule.     -   ii. Interleave different portions of other codewords of the         group between the multiple flash memory planes while maintaining         the even odd ordering rule, the programming type ordering rule         and the codeword portions ordering rule.

The programming circuit 1433 may be arranged to violate the at least one ordering rule for each type of codeword of the different types of codewords.

The programming circuit may perform said violation of at least one ordering rule while programming the at least two portions to rows having a same row number or to two portions of rows having different row numbers.

The group of codewords can be programmed to a flash memory block that spans over multiple planes. The programming circuit 1433 may be arranged to program the at least two portions to a row at a start of a flash memory block and to another row at an end of another flash memory block.

It is noted that programming circuit 1433 can perform the interleaving between multiple flash memory planes that belong to a same flash memory die, to a pair of flash memory dies or to more than two flash memory dies (for example—four).

According to various embodiments of the invention the ordering circuit 1431 can generate or receive order information that will cause the programming circuit to violate only one ordering rule out of the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule.

According to an embodiment of the invention the ordering circuit 1431 can generate order information that will apply different odd and even ordering rules for different types of programming. Any of the mentioned above methods can apply the same. For example, the interleaving can be done between MSB and LSB programming and not between odd and even pages.

According to an embodiment of the invention the ordering circuit 1431 is arranged to generate the order information based on the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule. Thus, only these rules can determine the order of programming. Alternatively, one or more additional rules or mapping can be applied in order to determine the order information. For example, these rules can determine a logical program order that may be altered (by applying a logical to physical mapping) to determine order information that represents the physical program order. It is noted that other transformations (not limited to logical to physical mappings) can be applied when generating (by the ordering circuit 1431 or by another entity) the order information.

For example, the ordering circuit can be arranged to determine a logical program order based upon the even odd ordering rule and the program type ordering rule; and apply a logical to physical mapping on the logical program order to provide a physical program order that is upheld during the interleaving of the different portions of the other codewords of the group.

Yet according to another embodiment of the invention each plane has its own erase circuit, program circuit and read circuit. This is illustrated in FIG. 15. Memory planes 1412, 1414, 1422 and 1424 have read circuits 1412(1), 1414(1), 1422(1) and 1424(1) respectively, have erase circuits 1412(2), 1414(2), 1422(2) and 1424(2) respectively and have programming circuits 1412(3), 1414(3), 1422(3) and 1424(3).

FIG. 16 illustrates method 800 for programming multiple codewords in accordance with an embodiment of the invention.

Method 800 may start by stage 810 that may include receiving multiple codewords. Each codeword may include multiple codeword portions.

In accordance with an embodiment of the invention, stage 810 can include receiving multiple information entities and/or units to be decoded and encoding them to provide the multiple codewords. The multiple codewords and/or, the information units can be stored in a buffer before the multiple codewords are written to the flash memory rows. In one embodiment in accordance with the invention, the multiple codewords can be interleaved before step 820. The multiple codewords can be written to the flash memory row portions in an interleaved manner (for example by writing different portions of a codeword to different pages/blocks/dies). Stage 810 may be followed by stage 820 of writing different portions of each codeword to at least two groups of flash memory row portions that may belong to different groups of flash memory rows. A first portion of a certain codeword may be written to a first group of flash memory row portions that may belong to a first group of flash memory rows. A second portion of the certain codeword may be written to a second group of flash memory row portions that may belong to a second group of flash memory rows that may differ from the first group of flash memory rows.

While certain features of the invention have been illustrated and described herein, many modifications, substitutions, changes, and equivalents will now occur to those of ordinary skill in the art. It is, therefore, to be understood that the appended claims are intended to cover all such modifications and changes as fall within the true spirit of the invention. 

What is claimed is:
 1. A method for programming a group of codewords, wherein each codeword comprises multiple codeword portions, the method comprising: interleaving at least two portions of a first codeword of a group of codewords between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; interleaving different portions of other codewords of the group of codewords between multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule; wherein the multiple flash memory planes comprise the at least two flash memory planes; wherein the codeword portions ordering rule determines an order of programming of different portions of a same codeword; wherein the even odd ordering rule determines an order of programming codeword portions to even pages and odd pages of the flash memory planes; wherein the programming type ordering rule determines an order of programming types that differ from each other by significance; and wherein the programming type ordering rule defines at least two different decoupling sequence steps for at least two different programming types.
 2. The method according to claim 1, further comprising violating the at least one ordering rule for each type of codeword of different types of codewords.
 3. The method according to claim 1, wherein the interleaving of the at least two portions comprises programming the at least two portions to rows of the at least two flash memory planes, the rows having a same row number.
 4. The method according to claim 1, wherein the interleaving of the at least two portions comprises programming the at least two portions to rows of the at least two flash memory planes, the rows, the rows having different row numbers.
 5. The method according to claim 1, further comprising programming the group of codewords to rows that form a flash memory block per each flash memory plane; wherein the interleaving of the at least two portions comprises programming the at least two portions to a row at a start of a flash memory block and to another row at an end of another flash memory block.
 6. The method according to claim 1, wherein the multiple flash memory planes belong to a same flash memory die.
 7. The method according to claim 1, wherein the multiple flash memory planes belong to multiple flash memory dies.
 8. The method according to claim 1, wherein the interleaving of the at least two portions comprises violating only the even odd ordering rule.
 9. The method according to claim 1, wherein the interleaving of the at least two portions comprises violating only the programming type ordering rule.
 10. The method according to claim 1, wherein the interleaving of the at least two portions comprises violating only the codeword portions ordering rule.
 11. The method according to claim 1, further comprising interleaving each codeword between at least four flash memory planes.
 12. The method according to claim 1 further comprising compensating for an expected outcome of the violating of the at least one ordering rule during the interleaving of the at least two portions of the first codeword.
 13. The method according to claim 1, wherein sizes of the different decoupling sequence steps are set according to sensitivity of the at least two different programming types to noise.
 14. A method for programming a group of codewords, wherein each codeword comprises multiple codeword portions, the method comprising: interleaving at least two portions of a first codeword of a group of codewords between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; interleaving different portions of other codewords of the group of codewords between multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule; determining an order of programming of the different portions of the other codewords of the group of codewords by: determining a logical programming order based upon the even odd ordering rule and the programming type ordering rule; and applying a logical to physical mapping on the logical programming order to provide a physical programming order that is upheld during the interleaving of the different portions of the other codewords of the group of codewords; wherein the multiple flash memory planes comprise the at least two flash memory planes; wherein the codeword portions ordering rule determines an order of programming of different portions of a same codeword; wherein the even odd ordering rule determines an order of programming codeword portions to even pages and odd pages of the flash memory planes; and wherein the programming type ordering rule determines an order of programming types that differ from each other by significance.
 15. A system, comprising: at least one flash memory die that comprises multiple flash memory planes; and a memory controller arranged to: interleave at least two portions of a first codeword of a group of codewords between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; and interleave different portions of other codewords of the group of codewords between the multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule; wherein the multiple flash memory planes comprise the at least two flash memory planes; wherein the codeword portions ordering rule determines an order of programming of different portions of a same codeword; wherein the even odd ordering rule determines an order of program codeword portions to even pages and odd pages of the flash memory planes; wherein the programming type ordering rule determines an order of program types that differ from each other by significance; and wherein the programming type ordering rule defines at least two different decoupling sequence steps for at least two different programming types.
 16. The system according to claim 15 wherein the memory controller is arranged to violate the at least one ordering rule for each type of codeword of the different types of codewords.
 17. The system according to claim 15 wherein the memory controller is arranged to program the at least two portions to rows having a same row number.
 18. The system according to claim 15 wherein the memory controller is arranged to program the at least two portions to rows having different row numbers.
 19. The system according to claim 15, wherein the memory controller is arranged to program the group of codewords to rows that define a flash memory block per each flash memory plane; and wherein the memory controller is arranged to program the at least two portions to a row at a start of a flash memory block and to another row at an end of another flash memory block.
 20. The system according to claim 15, wherein the multiple flash memory planes belong to a same flash memory die.
 21. The system according to claim 15, wherein the multiple flash memory planes belong to multiple flash memory dies.
 22. The system according to claim 15 wherein the memory controller is arranged to violate only the even odd ordering rule.
 23. The system according to claim 15 wherein the memory controller is arranged to violate only the programming type ordering rule.
 24. The system according to claim 15 wherein the memory controller is arranged to violate only the codeword portions ordering rule.
 25. The system according to claim 15 wherein the memory controller is arranged to interleave each codeword between at least four flash memory planes.
 26. The system according to claim 15, further comprising an encoder that is arranged to at least partially compensate for an expected outcome of violating of the at least one ordering rule during the interleaving of the at least two portions of the first codeword.
 27. The system according to claim 15, wherein sizes of the different decoupling sequence steps are set according to sensitivity of the different types of programming to noise.
 28. A system, comprising: at least one flash memory die that comprises multiple flash memory planes; and a memory controller arranged to: interleave at least two portions of a first codeword of a group of codewords between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; and interleave different portions of other codewords of the group of codewords between the multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule; wherein the multiple flash memory planes comprise the at least two flash memory planes; wherein the codeword portions ordering rule determines an order of programming of different portions of a same codeword; wherein the even odd ordering rule determines an order of program codeword portions to even pages and odd pages of the flash memory planes; wherein the programming type ordering rule determines an order of program types that differ from each other by significance; wherein the memory controller is further arranged to determine a logical program order based upon the even odd ordering rule and the program type ordering rule; and apply a logical to physical mapping on the logical program order to provide a physical programming order that is upheld during the interleaving of the different portions of the other codewords of the group of codewords.
 29. A non-transitory computer readable medium, wherein the non-transitory computer readable medium storing instructions for: interleaving at least two portions of a first codeword of a group of codewords between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; interleaving different portions of other codewords of the group of codewords between multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule; wherein the multiple flash memory planes comprise the at least two memory flash memory planes; wherein the codeword portions ordering rule determines an order of programming of different portions of a same codeword; wherein the even odd ordering rule determines an order of programming codeword portions to even pages and odd pages of the flash memory planes; wherein the programming type ordering rule determines an order of programming types that differ from each other by significance; and wherein the programming type ordering rule defines at least two different decoupling sequence steps for at least two different programming types.
 30. The non-transitory computer readable medium according to claim 29, wherein the non-transitory computer readable medium storing instructions for violating the at least one ordering rule for each type of codeword of different types of codewords.
 31. The non-transitory computer readable medium according to claim 29, wherein the non-transitory computer readable medium storing instructions for programming the at least two portions to rows of the at least two flash memory planes, the rows having a same row number.
 32. The non-transitory computer readable medium according to claim 29, wherein the non-transitory computer readable medium storing instructions for programming the at least two portions to rows of the at least two flash memory planes, the rows having different row numbers.
 33. The non-transitory computer readable medium according to claim 29, wherein the non-transitory computer readable medium storing instructions for programming the group of codewords to rows of the at least two flash memory planes, the rows form a flash memory block per each flash memory plane; wherein the interleaving of the at least two portions comprises programming the at least two portions to a row at a start of a flash memory block and to another row at an end of another flash memory block.
 34. The non-transitory computer readable medium according to claim 29, wherein the multiple flash memory planes belong to a same flash memory die.
 35. The non-transitory computer readable medium according to claim 29, wherein the multiple flash memory planes belong to multiple flash memory dies.
 36. The non-transitory computer readable medium according to claim 29, wherein the non-transitory computer readable medium storing instructions for violating only the even odd ordering rule.
 37. The non-transitory computer readable medium according to claim 29, wherein the non-transitory computer readable medium storing instructions for violating only the programming type ordering rule.
 38. The non-transitory computer readable medium according to claim 29, wherein the non-transitory computer readable medium storing instructions for violating only the codeword portions ordering rule.
 39. The non-transitory computer readable medium according to claim 29 wherein the non-transitory computer readable medium storing instructions for interleaving each codeword between at least four flash memory planes.
 40. The non-transitory computer readable medium according to claim 29, wherein the non-transitory computer readable medium storing instructions for at least partially compensating for an expected outcome of the violating of the at least one ordering rule during the interleaving of the at least two portions of the first codeword.
 41. The non-transitory computer readable medium according to claim 29, wherein sizes of the different decoupling sequence steps are set according to sensitivity of the at least two different programming types to noise.
 42. A non-transitory computer readable medium, wherein the non-transitory computer readable medium storing instructions for: interleaving at least two portions of a first codeword of a group of codewords between at least two flash memory planes while violating at least one ordering rule out of (a) an even odd ordering rule, (b) a programming type ordering rule, and (c) a codeword portions ordering rule; interleaving different portions of other codewords of the group of codewords between multiple flash memory planes while maintaining the even odd ordering rule, the programming type ordering rule and the codeword portions ordering rule; determining a logical programming order based upon the even odd ordering rule and the programming type ordering rule; and applying a logical to physical mapping on the logical programming order to provide a physical programming order that is upheld during the programming of the interleaving of the different portions of the other codewords of the group of codewords; wherein the multiple flash memory planes comprise the at least two flash memory planes; wherein the codeword portions ordering rule determines an order of programming of different portions of a same codeword; wherein the even odd ordering rule determines an order of programming codeword portions to even pages and odd pages of the flash memory planes; wherein the programming type ordering rule determines an order of programming types that differ from each other by significance. 